package com.le.tester.book.effectivejava3rdchinese.secondReading.l02;

/**
 * createTime：2024-08-02 11:21
 * description：使用javaBean，setter来设置参数
 */
public class NutritionFactsJavaBean {

    private int servingSize = -1;

    private int servings = -1;

    private int calories = 0;

    private int fat = 0;

    private int sodium = 0;

    private int carbohydrate = 0;


    //无参构造器
    public NutritionFactsJavaBean() {
    }

    public void setServingSize(int servingSize) {
        this.servingSize = servingSize;
    }

    public void setServings(int servings) {
        this.servings = servings;
    }

    public void setCalories(int calories) {
        this.calories = calories;
    }

    public void setFat(int fat) {
        this.fat = fat;
    }

    public void setSodium(int sodium) {
        this.sodium = sodium;
    }

    public void setCarbohydrate(int carbohydrate) {
        this.carbohydrate = carbohydrate;
    }
}
